<template>
  <div class="table-wrapper">
    <a-tabs default-active-key="base" @change="change">
      <a-tab-pane key="base">
        <span slot="tab"><a-icon type="apple" />网站配置</span>
        <BaseConfig ref="base"/>
      </a-tab-pane>
      <a-tab-pane key="reg">
        <span slot="tab"><a-icon type="android" />注册配置</span>
        <RegConfig ref="reg"/>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script>
import BaseConfig from './webconfig/BaseConfig.vue'
import RegConfig from './webconfig/RegConfig.vue'

export default {
  name: 'WebConfig',
  data () {
    return {
      form: this.$form.createForm(this),
      record: {}
    }
  },
  components: {
    BaseConfig,
    RegConfig
  },
  methods: {
    change (key) {
      this.$nextTick(() => {
        this.$refs[key].initData()
      })
    }
  }
}
</script>
